<template>
  <div class="selectAddressBox wap">
    <x-header :left-options="{backText: ''}" class="whiteTheme">
      <span>选择地址</span>
    </x-header>
    <div class="main">
      <scroller
        ref="selectAddScroller"
        :on-refresh="refresh"
        :noDataText="noDataText"
        :on-infinite="infinite">
        <div class="addressBox">
          <div class="list" v-for="(item,index) in itemData" :key="index" @click="selectInit(item)">
            <div class="lt" v-if="item.id==addressId">
              <img src="../../../assets/img/cart/select_11_3.png"/>
            </div>
            <div class="rt">
              <p>
                <span class="userName">{{item.name}}</span>
                <span class="tel">{{item.phone}}</span>
              </p>
              <p class="subTip">{{item.address}}</p>
            </div>

          </div>

        </div>
      </scroller>
    </div>

    <x-button @click.native="addAddress()">添加</x-button>
  </div>
</template>

<script src="./chooseAddress.js"></script>

<style lang="less" scoped>
  @import "./chooseAddress.less";
</style>
